Methanol-Synthese

T=493;15K p=50 bar

Bilanzen

Stoffbilanzen

$\dot n_i = \dot n_{i, 0} + \sum_{j}{\nu_ij \xi_j}$

Energiebilanz

$0 = \dot Q + \sum\limits_{j}{\xi_j \Delta H_j}$

Gleichgewichtskonstanten

$\begin{array}{ll} exp \left(- \frac{\Delta G_i}{R T} \right) &= K_p K_{\phi^{eq}} = K_x \prod\limits_{i} \left( \frac{p}{p^0}\right)^{\nu_i} K_{\phi^{eq}} \\ &=\prod\limits_{i} (n_i)^{\nu_i}\left( \frac{p}{p^0}\right)^{\sum\limits_{i} \nu_i}(n)^{-\sum\limits_{i} \nu_i} K_{\phi^{eq}}\end{array}$

$p^0 = 1 bar$

Idealer Gas, $K_{\phi^{eq}}=1$

Methode A) Geringe Veränderung der Reaktionsenthalpie mit der Temperatur

Van't Hoff, $\frac{d ln K}{dT} = -\frac{\Delta H}{R T^2} \sim \Rightarrow ln \left(\frac{K}{K'} \right) = -\frac{\Delta H^0}{R}\left(\frac{1}{T} - \frac{1}{T'} \right)$

$\begin{array}{ll} K_{(493,15K)} &= K_{(298,15K)} \times exp \left[-\frac{\Delta H^0}{R}\left(\frac{1}{493,15 K} - \frac{1}{298,15 K} \right)\right] \\ &= \prod_i (n_i)^{\nu_i}\left( \frac{p}{p^0}\right)^{\sum_i \nu_i}(n)^{-\sum_i \nu_i}\end{array}$

Methode B) Wechselwirkung der Reaktionsenthalpie mit der Temperatur [SVNA]

$\Delta H^\circ = \Delta H_0^\circ + R \int\limits_{T_0}^{T}{\frac{\Delta Cp^\circ}{R}dT}$

$\Delta S^\circ = \Delta S_0^\circ + R \int\limits_{T_0}^{T}{\frac{\Delta Cp^\circ}{R}\frac{dT}{T}}$

$\Delta G^\circ = \Delta H^\circ - T \Delta S^\circ = \Delta H_0^\circ + R \int\limits_{T_0}^{T}{\frac{\Delta Cp^\circ}{R}dT} - T \Delta S_0^\circ - R T \int\limits_{T_0}^{T}{\frac{\Delta Cp^\circ}{R}\frac{dT}{T}}$

$\Delta S_0^\circ = \frac{\Delta H_0^\circ - \Delta G_0^\circ}{T_0}$

$\Delta G^\circ = \Delta H_0^\circ - \frac{T}{T_0}(\Delta H_0^\circ -\Delta G_0^\circ) + R \int\limits_{T_0}^{T}{\frac{\Delta Cp^\circ}{R}dT} - R T \int\limits_{T_0}^{T}{\frac{\Delta Cp^\circ}{R}\frac{dT}{T}}$

$\begin{array}{ll} K_{(T)} &= exp \left(-\frac{\Delta H_0^\circ}{R T} + \frac{(\Delta H_0^\circ -\Delta G_0^\circ)}{R T_0} - \frac{1}{T}\int\limits_{T_0}^{T}{\frac{\Delta Cp^\circ}{R}dT} + \int\limits_{T_0}^{T}{\frac{\Delta Cp^\circ}{R}\frac{dT}{T}}\right) \\ &= \prod_i (n_i)^{\nu_i}\left( \frac{p}{p^0}\right)^{\sum_i \nu_i}(n)^{-\sum_i \nu_i}\end{array}$

Somit läßt sich K(T) bestimmen, insofern man über einen Ausdruck für $Cp_i(T)$ verfügt. Bei geringer Veränderung der Wärmekapazität Cp im Temperatur-Bereich kann man auch einen bestimmten Mittelwert als ~konstant einsetzen.

Methode C) Gibbs'sche Energie-Funktion - Gef(T) - aus Thermochemischen Tabellen [BP]

$-Gef(T) = -[G(T)-H(298,15)]/T$

$-R ln(K) = \sum\nu_i Gef_i - \sum \nu_i H_i(298,15K)/T$

In thermochemischen Tabellen [BP] sind die Werte -Gef(T) verfügbar.

Literaturhinweise

  • [SVNA] Smith J.M., Van Ness H.C., Abbott M.M.; Introduction to chemical engineering thermodynamics; 6th ed.; McGraw-Hill; New York; 2001; S. 458-462.
  • [BP] Barin Isan, Platzki Gregor; Thermochemical data of pure substances; 3. ed.; VCH; New York; 1995.

Vereinfachter Ansatz

Mittelwert von $Cp(T)$, $Cp(T_0)$ für eine grobe Annäherung: $\left\langle Cp \right\rangle_{T_0}^T = \frac{1}{2}\times (Cp(T)+Cp(T_0))$

$\Delta \left\langle Cp \right\rangle_{T_0}^T =\sum\limits_{i}^{} \nu_i \left\langle Cp_i \right\rangle_{T_0}^T $

$\Delta H^\circ = \Delta H_0^\circ + \Delta \left\langle Cp \right\rangle_{T_0}^T \times (T - T_0)$

$\Delta S^\circ = \Delta S_0^\circ + \Delta \left\langle Cp \right\rangle_{T_0}^T \times ln(T/T_0) $

$\Delta G^\circ = \Delta H_0^\circ - \frac{T}{T_0}(\Delta H_0^\circ -\Delta G_0^\circ) + \Delta \left\langle Cp \right\rangle_{T_0}^T \times (T - T_0) - \Delta \left\langle Cp \right\rangle_{T_0}^T \times T \times ln(\frac{T}{T_0}) $

$\begin{array}{ll} K_{(T)} &= exp \left(-\frac{\Delta H_0^\circ}{R T} + \frac{(\Delta H_0^\circ -\Delta G_0^\circ)}{R T_0} - \frac{\left\langle Cp \right\rangle_{T_0}^T}{R}\times \frac{(T - T_0)}{T} +\frac{\left\langle Cp \right\rangle_{T_0}^T}{R}\times ln(\frac{T}{T_0}) \right) \\ &= \prod_i (n_i)^{\nu_i}\left( \frac{p}{p^0}\right)^{\sum_i \nu_i}(n)^{-\sum_i \nu_i}\end{array}$


In [18]:
from scipy import optimize
import numpy as np

p = 50. # bar
temp = 273.15 + 220. # K

namen = ['CO', 'H2', 'CO2', 'H2O', 'CH3OH']

n0co = 50.
n0h2 = 100.
n0co2 = 10.
n0h2o = 0.
n0ch3oh = 0.

ne = np.array([n0co, n0h2, n0co2, n0h2o, n0ch3oh])

nuij = np.array([[-1, -2, 0, 0, +1] ,
                 [0, -3, -1, +1, +1], 
                 [-1, +1, +1, -1, 0]]).T

h_298 = np.array(
    [-110.541, 0., -393.505, -241.826,-201.167]) * 1000 # J/mol

g_298 = np.array(
    [-169.474, -38.962, -457.240, -298.164, -272.667]) * 1000 # J/mol

cp_298 = np.array(
    [29.140, 28.836, 37.132, 33.590, 43.812] # J/(mol K)
)

cp_493 = np.array(
    [29.763, 29.254, 44.399, 35.163, 58.951] #  J/(mol K)
)

# Mean delta Cp assumed constant.
mean_cp = np.mean(
    np.array([cp_298, cp_493]), axis=0) 

# Calc. H(T) and G(T) with constant mean Cp approach (0.32% error)

h_493 = h_298 + mean_cp * (493.15 - 298.15)

g_493 = h_298 - 493.15/298.15 * (
    h_298 - g_298) + mean_cp * ((
    493.15 - 298.15) - 493.15 * np.log(493.15/298.15))

delta_hr_298 = nuij.T.dot(h_298)

delta_gr_298 = nuij.T.dot(g_298)

delta_hr_493 = nuij.T.dot(h_493)

delta_gr_493 = nuij.T.dot(g_493) 

k_298 = np.exp(-delta_gr_298/(8.314*298.15))
k_493 = np.exp(-delta_gr_493/(8.314*493.15))

for i, f in enumerate(delta_hr_298):
    print('Delta H_' + str(i+1) + '(298.15K)=' + str(f/1000.) + 'kJ/mol')

print('\n')
for i, f in enumerate(k_493):
    print('K' + str(i+1) + '(493K)=' + str(f))
print('\n')
    
def fun(x_vec):    
    nco = x_vec[0]
    nh2 = x_vec[1]
    nch3oh = x_vec[2]
    xi1 = x_vec[3]
    
    f1 = -nco + n0co - xi1
    f2 = -nh2  + n0h2 -2*xi1
    f3 = -nch3oh + n0ch3oh +xi1
    f4 = -k_493[0] * (nco * nh2**2) + \
            nch3oh * (p/1.)**-2 * (nco + nh2 + nch3oh)**-(-2)
    
    return [f1, f2, f3, f4]

n0 = np.array([n0co, n0h2, n0ch3oh])
x0 = np.append(n0, [0.])

sol = optimize.root(fun, x0)
f_final = - sol.x[:3].reshape([3,1]) + ne[[0,1,4]].reshape([3,1]) + nuij[:,0][[0,1,4]].reshape([3,1])*sol.x[-1]

print(sol)
print('\n\n')
print('Zustand der Optimisierungs-Funktionen\n')
print(f_final)

print('\n\n')
print('T=493.15K, p=50 bar')
print('Lösung für nur einzige Reaktion (ohne CO2):\n')
for i, f in enumerate(sol.x[:2]):
    print('n_' + namen[i] + '= ' + str(f) + ' mol')
print('n_' + namen[-1] + '= ' + str(sol.x[2]) + ' mol')

# Lösung des einfacheren Falls in schwierigerem Fall einwenden.
def fun(x_vec):    
    nco = x_vec[0]
    nh2 = x_vec[1]
    nco2 = x_vec[2]
    nh2o = x_vec[3]
    nch3oh = x_vec[4]
    xi1 = x_vec[5]
    xi2 = x_vec[6]
    xi3 = x_vec[7]
    
    f1 = -nco + n0co - xi1 +0 -xi3
    f2 = -nh2  + n0h2 -2*xi1 -3*xi2 +xi3
    f3 = -nco2 + n0co2 +0 -xi2 +xi3
    f4 = -nh2o + n0h2o +0 +xi2 -xi3
    f5 = -nch3oh + n0ch3oh +xi1 +xi2 -0
    f6 = -k_493[0] * (nco * nh2**2) + \
        nch3oh * (p/1.)**-2 * (nco + nh2 + nco2 + nh2o + nch3oh)**-(-2)
    f7 = -k_493[1] * (nco2 * nh2**3) + \
        nch3oh * nh2o * (p/1.)**-2 * (nco + nh2 + nco2 + nh2o + nch3oh)**-(-2)
    f8 = -k_493[2] * (nco * nh2o) + \
        nco2 * nh2 * (p/1.)**0 * (nco + nh2 + nco2 + nh2o + nch3oh)**-0
    
    return [f1, f2, f3, f4, f5, f6, f7, f8]

n0 = ne
x0 = np.append(n0, [0., 0., 0.])

sol = optimize.root(fun, x0)

f_final = - sol.x[:5].reshape([5,1]) + ne.reshape([5,1]) + nuij.dot(sol.x[5:].reshape([3,1]))

print('\n\n')
print('T=493.15K, p=50 bar')
print('Lösung für alle drei Reaktionen, mit CO2:\n')
for i, f in enumerate(sol.x[:5]):
    print('n_' + namen[i] + '= ' + str(f) + ' mol')

print('\n')

for i, f in enumerate(sol.x[5:]):
    print('xi_' + str(i) + '= ' + str(f) + ' mol')

print('\n')
print('0 = Q + Sum(Delta H)_ein - Sum(Delta H)_aus')
print('-Q = -Sum(xi_j * Delta H_j) = ' + str(
    sol.x[:5].dot(h_493) - ne.dot(h_493)) + 'kJ/h')

print('\n\n')
print('Zustand der Optimisierungs-Funktionen\n')
print(f_final)


Delta H_1(298.15K)=-90.626kJ/mol
Delta H_2(298.15K)=-49.488kJ/mol
Delta H_3(298.15K)=-41.138kJ/mol


K1(493K)=0.00881414730139
K2(493K)=5.71444621084e-05
K3(493K)=154.24324556


    fjac: array([[ -2.70197848e-02,  -2.32906115e-14,  -3.40783520e-17,
         -9.99634899e-01],
       [ -3.56958949e-01,  -9.34070241e-01,  -2.80637774e-15,
          9.64847665e-03],
       [ -1.94977236e-01,   7.45658251e-02,  -9.77955030e-01,
          5.27016709e-03],
       [  9.13145179e-01,  -3.49217299e-01,  -2.08815611e-01,
         -2.46819976e-02]])
     fun: array([ 0.,  0.,  0.,  0.])
 message: 'The solution converged.'
    nfev: 16
     qtf: array([  1.12812168e-08,  -1.08886312e-10,  -5.94756122e-11,
         2.78544664e-10])
       r: array([ 37.00991729, -14.14349864,  -8.45715065,   0.06650004,
         1.0705833 ,   0.08162842,   2.22471837,   1.02254191,
        -0.93231759,  -0.42255138])
  status: 1
 success: True
       x: array([ 13.48943539,  26.97887078,  36.51056461,  36.51056461])



Zustand der Optimisierungs-Funktionen

[[ 0.]
 [ 0.]
 [ 0.]]



T=493.15K, p=50 bar
Lösung für nur einzige Reaktion (ohne CO2):

n_CO= 13.4894353897 mol
n_H2= 26.9788707795 mol
n_CH3OH= 36.5105646103 mol



T=493.15K, p=50 bar
Lösung für alle drei Reaktionen, mit CO2:

n_CO= 14.8674441922 mol
n_H2= 29.3557068967 mol
n_CO2= 9.87360617079 mol
n_H2O= 0.126393829202 mol
n_CH3OH= 35.258949637 mol


xi_0= 46532.1549561 mol
xi_1= -46496.8960065 mol
xi_2= -46497.0224003 mol


0 = Q + Sum(Delta H)_ein - Sum(Delta H)_aus
-Q = -Sum(xi_j * Delta H_j) = -3438943.3356kJ/h



Zustand der Optimisierungs-Funktionen

[[  3.20454774e-12]
 [ -3.32534000e-12]
 [  4.42845760e-12]
 [  1.01382791e-12]
 [ -7.21911420e-12]]

In [19]:
print('Solution, to 30 decimals')
print('')
for part in sol.x:
    print('{:.30g}'.format(part).replace('.',','))


Solution, to 30 decimals

14,8674441921652746856352678151
29,3557068967308225637680152431
9,87360617079241897897645685589
0,126393829202138735512406242378
35,2589496370418942206015344709
46532,154956105856399517506361
-46496,8960064688217244111001492
-46497,0224002980248769745230675

SVN 13.6 (S. 485)

$C_2H_4(g) + H_2 O(g) \rightleftharpoons C_2H_5OH(g)$


In [4]:
p = 35. # bar
temp = 523.15 # K

namen = ['C2H4', 'H2O', 'C2H5OH']

n0c2h4 = 2.
n0h2o = 10.
n0c2h5oh = 0.

ne = np.array([n0c2h4, n0h2o, n0c2h5oh])

nuij = np.array([[-1, -1, +1]]).T

h_298 = np.array([+52.467, -241.826, -234.806]) * 1000. # J/mol
g_298 = np.array([-12.928, -298.164, -319.092]) * 1000. # J/mol
cp_298 = np.array([42.891, 33.590, 65.374])  # J/(mol K)
cp_523 = np.array([64.384, 35.483, 98.028]) #  J/(mol K)

# Mean delta Cp assumed constant.
mean_cp = np.mean(
    np.array([cp_298, cp_523]), axis=0) 

# Calc. H(T) and G(T) with constant mean Cp approach (0.32% error)

h_523 = h_298 + mean_cp * (523.15 - 298.15)

g_523 = h_298 - 523.15/298.15 * (
    h_298 - g_298) + mean_cp * ((
    523.15 - 298.15) - 523.15 * np.log(523.15/298.15))

delta_hr_298 = nuij.T.dot(h_298)

delta_gr_298 = nuij.T.dot(g_298)

delta_hr_523 = nuij.T.dot(h_523)

delta_gr_523 = nuij.T.dot(g_523) 

k_298 = np.exp(-delta_gr_298/(8.314*298.15))
k_523 = np.exp(-delta_gr_523/(8.314*523.15))

print('\n')
for i, f in enumerate([k_523]):
    print('K' + str(i+1) + '(523.15K)=' + str(f))
print('\n')


def fun(x_vec):    
    nc2h4 = x_vec[0]
    nh2o = x_vec[1]
    nc2h5oh = x_vec[2]
    xi1 = x_vec[3]
    
    f1 = -nc2h4 + n0c2h4 -xi1
    f2 = -nh2o  + n0h2o -xi1
    f3 = -nc2h5oh + n0c2h5oh +xi1
    f4 = -k_523 * (nc2h4 * nh2o) + \
            nc2h5oh * (p/1.)**-1. * (nc2h4 + nh2o + nc2h5oh)**(-(-1))
    
    return [f1, f2, f3, f4]

#n0 = np.array([(0.233), n0h2o, n0c2h5oh])
n0 = ne
x0 = np.append(ne, [0.])
sol = optimize.root(fun, x0)
f_final = - sol.x[:3].reshape([3,1]) + n0.reshape([3,1]) + nuij.reshape([3,1])*sol.x[-1]

print(sol)
print('\n\n')
print('Zustand der Optimisierungs-Funktionen\n')
print(f_final)

print('\n\n')
print('T=' + str(temp) +'K, p=' + str(p) +'bar')
for i, f in enumerate(sol.x[:-1]):
    print('n_' + namen[i] + '= ' + str(f) + ' mol')
print('Y(CH3CH2OH/C2H4)= ' + 
      '{:.1%}'.format(sol.x[-1] / n0c2h4))

# Cp(T)/R=(A + B T + C T^2 + D T^-2)

t = 523.15 # K
t_0 = 298.15 # K
cp_params = 8.314 * np.array([
    [1.424, 14.394*1e-3, -4.392*1e-6, 0.],
    [3.470, 1.450*1e-3, 0., 0.121*1e+5],
    [3.518, 20.001*1e-3, -6.002*1e-6, 0.]
]) # J/(mol K)

delta_cp_params = nuij.T.dot(cp_params)

h_523 = h_298 + cp_params[:, 0] * (t - t_0) + \
cp_params[:, 1]/2. * (t**2 - t_0**2) + \
cp_params[:, 2]/3. * (t**3 - t_0**3) + \
-cp_params[:, 3] * (1/t - 1/t_0)

g_523 = - t/t_0 * (h_298 - g_298) + h_523 + \
-cp_params[:, 0] * t * np.log(t/t_0) + \
-cp_params[:, 1] * t**2 * (1 - t_0/t) + \
-cp_params[:, 2]/2. * t**3 * (1 - (t_0/t)**2) + \
+cp_params[:, 3]/2. * 1/t * (1 - (t/t_0)**2)

k_523 = np.exp(-nuij.T.dot(g_523)/(8.314*t))

print('\n')
print('Mit dem Ausdruck für Cp(T)/R=(A + B T + C T^2 + D T^-2)')
for i, f in enumerate([k_523]):
    print('K' + str(i+1) + '(523.15K)=' + str(f))
print('\n')

n0 = ne
x0 = np.append(ne, [0.])
sol = optimize.root(fun, x0)
f_final = - sol.x[:3].reshape([3,1]) + n0.reshape([3,1]) + nuij.reshape([3,1])*sol.x[-1]

print(sol)
print('\n\n')
print('Zustand der Optimisierungs-Funktionen\n')
print(f_final)

print('\n\n')
print('T=' + str(temp) +'K, p=' + str(p) +'bar')
for i, f in enumerate(sol.x[:-1]):
    print('n_' + namen[i] + '= ' + str(f) + ' mol')
print('Y(CH3CH2OH/C2H4)= ' + 
      '{:.1%}'.format(sol.x[-1] / n0c2h4))



K1(523.15K)=[ 0.00855839]


    fjac: array([[ -9.96757045e-01,   6.89452693e-11,   3.96641278e-17,
         -8.04698255e-02],
       [  9.86365151e-04,  -9.99924873e-01,   3.94731801e-17,
         -1.22178279e-02],
       [ -2.56521381e-02,  -3.90775950e-03,  -9.47820817e-01,
          3.17745803e-01],
       [  7.62652458e-02,   1.16179883e-02,  -3.18803542e-01,
         -9.44676101e-01]])
     fun: array([ -5.55111512e-17,   1.66533454e-16,   0.00000000e+00,
         0.00000000e+00])
 message: 'The solution converged.'
    nfev: 10
     qtf: array([  7.09368659e-13,   1.07926303e-13,  -2.80103558e-12,
         8.32763594e-12])
       r: array([  1.00325351e+00,   9.89648645e-04,  -2.71564670e-02,
         9.97919911e-01,   1.00007513e+00,  -4.12319814e-03,
         9.99115067e-01,   1.05505174e+00,  -9.22852652e-01,
        -3.93035299e-01])
  status: 1
 success: True
       x: array([ 1.60267951,  9.60267951,  0.39732049,  0.39732049])



Zustand der Optimisierungs-Funktionen

[[ -5.55111512e-17]
 [  1.66533454e-16]
 [  0.00000000e+00]]



T=523.15K, p=35.0bar
n_C2H4= 1.60267951074 mol
n_H2O= 9.60267951074 mol
n_C2H5OH= 0.397320489257 mol
Y(CH3CH2OH/C2H4)= 19.9%


Mit dem Ausdruck für Cp(T)/R=(A + B T + C T^2 + D T^-2)
K1(523.15K)=[ 0.00927589]


    fjac: array([[ -9.96195235e-01,   1.86660835e-10,  -3.67171273e-17,
         -8.71496020e-02],
       [  1.15618621e-03,  -9.99911994e-01,  -3.65096834e-17,
         -1.32162093e-02],
       [ -2.77325187e-02,  -4.22206171e-03,  -9.48008369e-01,
          3.17006646e-01],
       [  8.26112811e-02,   1.25769293e-02,  -3.18245396e-01,
         -9.44318307e-01]])
     fun: array([  1.11022302e-16,  -5.55111512e-16,   0.00000000e+00,
         0.00000000e+00])
 message: 'The solution converged.'
    nfev: 10
     qtf: array([  1.31400768e-12,   2.00109889e-13,  -4.77990165e-12,
         1.42386562e-11])
       r: array([ 1.0038193 ,  0.0011607 , -0.02937035,  0.99756299,  1.00008801,
       -0.004454  ,  0.99896323,  1.05484301, -0.92102901, -0.39861313])
  status: 1
 success: True
       x: array([ 1.57658112,  9.57658112,  0.42341888,  0.42341888])



Zustand der Optimisierungs-Funktionen

[[  1.11022302e-16]
 [ -5.55111512e-16]
 [  0.00000000e+00]]



T=523.15K, p=35.0bar
n_C2H4= 1.57658111739 mol
n_H2O= 9.57658111739 mol
n_C2H5OH= 0.423418882611 mol
Y(CH3CH2OH/C2H4)= 21.2%

Min(G)

$\Delta G_{f i}^{0} + R T ln(y_i \hat{\phi_i} P/P^0) + \sum\limits_{k}{ \lambda_k a_{ik}}=0 \hspace{10mm} (i=1,2,...,N)$

$\sum\limits_{i}{n_i a_{ik}}=A_k \hspace{10mm} (k = 1,2,...,\omega)$


In [100]:
from scipy import optimize
import numpy as np

p = 50. # bar
temp = 273.15 + 220. # K

namen = ['CO', 'H2', 'CO2', 'H2O', 'CH3OH']

atom_namen = ['C', 'O', 'H']

n0co = 50.
n0h2 = 100.
n0co2 = 0.
n0h2o = 0.
n0ch3oh = 0.

ne = np.array([n0co, n0h2, n0co2, n0h2o, n0ch3oh])

aik = np.array([[1, 0, 1, 0, 1] ,
                 [1, 0, 2, 1, 1], 
                 [0, 2, 0, 2, 4]]).T

ak = aik.T.dot(ne)

h_298 = np.array(
    [-110.541, 0., -393.505, -241.826,-201.167]) * 1000 # J/mol

g_298 = np.array(
    [-169.474, -38.962, -457.240, -298.164, -272.667]) * 1000 # J/mol

cp_298 = np.array(
    [29.140, 28.836, 37.132, 33.590, 43.812] # J/(mol K)
)

cp_493 = np.array(
    [29.763, 29.254, 44.399, 35.163, 58.951] #  J/(mol K)
)

# Mean delta Cp assumed constant.
mean_cp = np.mean(
    np.array([cp_298, cp_493]), axis=0) 

# Calc. H(T) and G(T) with constant mean Cp approach (0.32% error)

h_493 = h_298 + mean_cp * (493.15 - 298.15)

g_493 = h_298 - 493.15/298.15 * (
    h_298 - g_298) + mean_cp * ((
    493.15 - 298.15) - 493.15 * np.log(493.15/298.15))

for i, f in enumerate(ak):
    print('A' + str(i+1) + '=' + str(f) + 'kmol/h')

print('\n')
    
def fun(x_vec): 
    ni = x_vec[:5]
    nt = sum(ni)
    lambdak = x_vec[5:]
    
    s_lambdak_aik = aik.dot(lambdak)
    s_ni_aik = aik.T.dot(ni)
    
    f_1_n = g_493/(8.314 * 493.15)  + np.log(
        ni/nt * 50./1.) + s_lambdak_aik/(8.314 * 493.15)
    f_n_w = - s_ni_aik + ak
    
    return np.concatenate([f_1_n, f_n_w])

n0 = ne
# Konvergenzfehled wegen Division durch Null vermeiden

n0[n0==0] = np.finfo(float).eps

n0[0] = 13.489435389746
n0[1] = 26.978870779492
n0[-1] = 36.5105646102539

x0 = np.concatenate([n0, np.repeat(0., 3)])
sol = optimize.root(fun, x0)

print('success: ' + str(sol.success))

print(sol)

print('\n')
print('n_i (kmol/h):')
print('\n')
for f in sol.x[:5]:
    print('{:.30g}'.format(f).replace('.',','))
print('\n')
print('lambda_k [adim]:')
print('\n')
for f in sol.x[5:]:
    print('{:.30g}'.format(f).replace('.',','))
print('\n')


A1=50.0kmol/h
A2=50.0kmol/h
A3=200.0kmol/h


success: True
    fjac: array([[ -4.40751570e-02,   9.23369687e-03,   9.21435497e-03,
         -3.37652422e-03,   9.22994483e-03,   7.06325216e-01,
          7.06325216e-01,   4.09060832e-10],
       [  6.53397982e-03,  -1.22821768e-02,   6.48793679e-03,
         -3.06040197e-02,   6.53148540e-03,   1.25999366e-04,
          1.25999366e-04,   9.99392347e-01],
       [ -1.81216670e-05,   2.82057013e-04,   2.56860356e-01,
         -9.65926957e-01,  -2.56397247e-04,  -3.98493125e-03,
         -3.98493125e-03,  -3.12404631e-02],
       [  1.30080764e-04,  -2.81906917e-04,   9.66382773e-01,
          2.56976861e-01,  -6.46271047e-05,  -5.68291507e-03,
         -5.68291507e-03,   1.59320448e-03],
       [  5.60731968e-01,   5.60650697e-01,   2.44860359e-04,
          2.21944418e-07,  -6.08740083e-01,   1.78061410e-02,
          1.78061410e-02,   7.19648057e-03],
       [ -7.25642391e-01,  -1.94389382e-02,  -1.80711322e-04,
         -1.59540807e-07,  -6.87266042e-01,  -1.80215970e-02,
         -1.80215970e-02,   9.00262784e-03],
       [ -3.96279511e-01,   8.27681491e-01,   6.49889878e-05,
          6.80387973e-08,   3.96198153e-01,  -2.03632339e-02,
         -2.03632285e-02,   1.01781470e-02],
       [ -1.53378566e-09,   3.20356052e-09,   1.63289750e-13,
          1.81181838e-16,   1.53355861e-09,   7.07106781e-01,
         -7.07106781e-01,   3.93947625e-11]])
     fun: array([  1.98951966e-13,   1.79412041e-13,   0.00000000e+00,
         7.26601002e-11,  -1.42108547e-14,   0.00000000e+00,
         0.00000000e+00,   0.00000000e+00])
 message: 'The solution converged.'
    nfev: 172
     qtf: array([  7.14278721e-10,   6.47770550e-09,   2.04451685e-07,
        -5.43905004e-08,   1.22749005e-11,  -8.69332342e-12,
         4.04098419e-12,   1.56582084e-20])
       r: array([ -1.41577843e+00,   3.56991294e-04,   4.31856908e+12,
        -5.06529094e+13,  -1.41159112e+00,  -6.18875622e-06,
        -4.92431560e-06,   1.17862091e-05,  -2.00121601e+00,
         2.39516030e+13,  -4.59116668e+14,  -3.99232544e+00,
         5.34471499e-06,  -1.99187919e-06,  -1.52320657e-05,
         7.66219539e+14,  -1.44906775e+16,   3.00415429e-01,
         8.07491166e-05,  -1.38110621e-04,  -4.92893861e-04,
         3.85525330e+15,  -5.32675168e-02,   2.30838030e-04,
         5.41396203e-04,   1.30836021e-04,  -8.76189092e-02,
        -1.16343263e-05,  -1.16127969e-05,  -3.20411702e-04,
        -3.44662917e-04,  -3.44678800e-04,  -6.79969685e-04,
         5.73400760e-09,   7.90269439e-04,   3.05881874e-12])
  status: 1
 success: True
       x: array([  1.34894354e+01,   2.69788708e+01,   5.12179993e-15,
         6.64119834e-17,   3.65105646e+01,  -2.36404228e+05,
         4.37089305e+05,   2.71239162e+04])


n_i (kmol/h):


13,4894353897488752380695586908
26,978870779497775345134868985
5,12179993219401913026310558643e-15
6,64119834092271178858773166496e-17
36,510564610251115880146244308


lambda_k [adim]:


-236404,227567895373795181512833
437089,304682597226928919553757
27123,9162197084988292772322893


C:\Users\Public\Apps\Anaconda3\lib\site-packages\ipykernel_launcher.py:65: RuntimeWarning: invalid value encountered in log

In [99]:
print('Solution, to 30 decimals')
print('')
for part in sol.x:
    print('{:.30g}'.format(part).replace('.',','))


Solution, to 30 decimals

13,4894353897488752380695586908
26,978870779497775345134868985
5,12179993219401913026310558643e-15
6,64119834092271178858773166496e-17
36,510564610251115880146244308
-236404,227567895373795181512833
437089,304682597226928919553757
27123,9162197084988292772322893